#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int my_atoi(const char* str)
{
	int i = 0;
	int digit = 0;
	for ( i = 0; str[i] > '9' && str[i] < '0' && str[i] != '\0'; i++);
	for (; str[i] <= '9' && str[i] >= '0' && str[i] != '\0';i++) {
		digit = digit * 10 + str[i] - '0';
	}
	return digit;
}

int main()
{
	char arr[50];
	scanf("%s", arr);
	int my_digit = my_atoi(arr);
	int digit = atoi(arr);
	printf("%d %d\n", my_digit, digit);
	printf("%d %d\n", my_digit * 2, digit * 2);
	return 0;
}